<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
  <style>
    body {
      margin: auto;
      perspective: 500px;
      transform-style: preserve-3d;
    }

    .commn {
      width: 100px;
      height: 100px;
      text-align: center;
      line-height: 100px;
      background-color: #f2f2f2;
      border: 1px solid gray;
      position: absolute;
      top: 0;
      left: 0;
    }

    .demo {
      z-index: 1;
      opacity: .5;
      background-color: pink;
    }

    .demo-3d {
      transform: translate3d(100px, 100px, -100px) rotate(45deg);
    }
  </style>
</head>

<body>
  <div class="commn demo">transform</div>
  <div class="commn demo-3d">transform3d</div>
</body>

</html>